package com.bgIntlgn.client.entity.warehourse;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

@Table(name = "depositories", constrain = "")
public class Depository implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('depositories_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = " primary key")
	private Long id;

	/**
	 * 负责人
	 */
	@Field(name = "manager", type = "int8", constrain = " not null references employees(id)  on update cascade on delete cascade")
	private Long manager;

	/**
	 * 仓库名称
	 */
	@Field(name = "name", type = "varchar(60)", constrain = "not null unique")
	private String name;

	/**
	 * 仓库类型
	 */
	@Field(name = "type", type = "int8", constrain = "not null references dictionarys(id) on update cascade on delete cascade")
	private Long type;

	/**
	 * 容积
	 */
	@Field(name = "volume", type = "double precision", constrain = "")
	private Double volume;

	/**
	 * 备注
	 */
	@Field(name = "comment", type = "varchar(200)", constrain = "")
	private String comment;

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getManager() {
		return this.manager;
	}

	public void setManager(Long manager) {
		this.manager = manager;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getType() {
		return this.type;
	}

	public void setType(Long type) {
		this.type = type;
	}

	public Double getVolume() {
		return this.volume;
	}

	public void setVolume(Double volume) {
		this.volume = volume;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

}
